#template('colorThemeInit.vm')

.dashboard-edit {
  display: flex;
  flex-direction: column;
  gap: .2em;
}

/* panels style gadget settings (forced in inline mode) */
.panels .gadget .gadget-title, .dashboard-edit .gadget .gadget-title {
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  padding: 5px 20px 5px 15px;
  text-align: left;
  text-transform: uppercase;
  background-color: $theme.panelHeaderBackgroundColor;
  #css3_backgroundLinearGradient({
     'to': 'bottom',
     'colors': [
      {'color': $theme.panelHeaderGradientColor, 'position': '0%'},
      {'color': $theme.panelHeaderBackgroundColor, 'position': '100%'}
    ]
  })
  border-radius: 7px 7px 0 0;
  border: 1px solid $theme.borderColor;
  color: $theme.panelHeaderTextColor;
  #css_textShadow('0', '1px', '0', $theme.panelHeaderGradientColor)
}

.panels .gadget, .dashboard-edit .gadget {
  background-color: $theme.panelBackgroundColor;
  margin: 1em 0;
  border-radius: 7px;
}

.panels .gadget .gadget-content, .dashboard-edit .gadget .gadget-content {
  background-color: $theme.panelBackgroundColor;
  color: $theme.panelTextColor;
  padding: 10px 15px;
  border-radius: 0 0 7px 7px;
  border-width: 0 1px 1px;
  border-style: solid;
  border-color: $theme.borderColor;
  overflow: auto;
}

/* Hide the dashboard metadata and any metadata that appears in a dashboard (e.g. the gadget metadata) */
.dashboard .metadata {
  display: none;
}

/* gadget handles on the dashboard */
.gadget-actions .action {
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  display: inline-block;
  height: 24px;
  margin-right: 6px;
  width: 16px;
}

.gadget-actions .edit.action.loading,
.dashboard-edit .addgadget.loading {
  background-image: url("$xwiki.getSkinFile('icons/xwiki/spinner.gif')");
}

.gadget .gadget-actions {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
}

.gadget:hover .gadget-actions {
  display: block;
}

/* Drag & drop effects */
.gadget-container-hover-highlight {
  background-color: $theme.highlightColor;
}

.column .gadget-placeholder {
  background-color: $theme.highlightColor;
  margin-top: 10px;
  padding: 20px;
}

.dashboard-edit .gadget .gadget-title {
  cursor: move;
}

.dashboard-edit .containeradd {
  display: flex;
  justify-content: end;
  gap: .2rem;
}

/* Add button decoration */
.dashboard-edit .addgadget, .dashboard-edit .addcontainer {
  display: flex;
  align-items: baseline;
  gap: .5em;
}

/* Hide gadget title, when wider than gadget width */
.gadget-title {
  line-height: 1.3em; // Increased value to prevent cutting off the type descenders
  overflow: hidden;
  text-overflow: ellipsis;
}
